﻿@{
    ViewData["Title"] = "仅包含table的页面";
    Layout = "~/Views/Shared/_LayuiTable.cshtml";
}
<form class="layui-form" id="searchForm" style="padding-bottom:8px" onsubmit="return false;">
    <div class="layui-input-inline">
        <input class="layui-input search_input" placeholder="请输入关键字" name="searchValue" autocomplete="off">
    </div>
    <div class="layui-input-inline">
        <a class="layui-btn layui-btn-normal" onclick="tableReload()">刷新</a>
    </div>
</form>
<table id="mainTable" lay-filter="demo"></table>
<script>
    //初始化table
    addLayuiUseEvent(function () {
        tableRender({
            where: getQueryWhere()
            , page: false
            , toolbar: true
            , url: '@ViewBag.ListUrl'
            , cols: [[
                { field: 'column1', align: 'center',sort: true, width: 120, title: '列1' }
                , { field: 'column2', align: 'center',sort: true, width: 150, title: '列2' }
            ]]
        });
    });
</script>